IEEE 802.1ag discusses Connectivity Fault Management (CFM). CFM principles are explained in Clause 18 of 802.1ag.
CFM functions are partitioned as follows:                Path discovery or Link Trace Message        Fault detection or absence of CCM        Fault verification and isolation or Loop Back        Fault notification        Fault recovery        
CFM mandates that edge-nodes or Maintenance Association End Points (MEPs) exchange Connectivity Check Messages (CCM). Only MEPs process the CCMs. Intermediate nodes (and MIPs) only forwards the received CCMs. They don't generate or terminate any CCM. In the event of failure they might appear to terminate CCMs, but they do not process CCMs. If three consecutive CCMs are not received by the MEPs within a given time-interval then it implies that fault has occurred. LTM and LBM are used to isolate the faulty link or node. On successful fault isolation, lower service layer will try to restore the traffic using some legacy restoration mechanisms, e.g. UPSR, BLSR, STP, RSTP, MSTP, etc. If restoration at a particular service layer fails then higher service layer will be notified about the fault and this higher service layer will try to restore the traffic. And so on.
Using this mechanism, CFM helps carriers to locate two types of fault: physical failure and mis-configuration. Physical failure includes node and link failure whereas mis-configuration happens due to negligence on the part of the administrator.